<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .head{
            width: 200px;
            height: 200px;
            margin: 200px auto;
            border: 2px solid #000;
            background: #ccc;
            position: relative;
        }
        .snake{
            width: 20px;
            height: 20px;
            background: red;
            position: absolute;
        }
    </style>
</head>
<body>
    <button class="btn">开始游戏</button>
    <div class="head">
        <div class="snake"></div>
    </div>
    
</body>
</html>
<script>
    const btn = document.querySelector('.btn')
    const snake = document.querySelector('.snake')
    function skmove(){
        setInterval(e => {
            
        })
    }
</script>